<?php
include("../includes/common.php");
if($islogin2==1){}else exit("<script language='javascript'>window.location.href='./login.php';</script>");
include './head.php';
if($conf['demo_is']==0){
 exit("<script language='javascript'>alert('测试支付已经关闭');window.location.href='./';</script>");
}
$uid=$rs=$DB->query("select * from pay_user WHERE name={$pid}"); 
foreach($uid as $res){
 $usid=$res['id'];
}
?> 
<div class="clearfix"></div>
	
  <div class="content-wrapper">
    <div class="container-fluid">
      <!-- Breadcrumb-->
     <div class="row pt-2 pb-2">
        <div class="col-sm-9">
		    <h4 class="page-title">支付测试</h4>
		    <ol class="breadcrumb">
            <li class="breadcrumb-item"><a href="javaScript:void();">支付</a></li>
            <li class="breadcrumb-item"><a href="javaScript:void();">接口</a></li>
            <li class="breadcrumb-item active" aria-current="page">测试</li>
         </ol>
	   </div>
     </div>
      <div class="row">
        <div class="col-lg-12">
          <div class="card">
            <div class="card-body">
              <form name=alipayment method="post" action="../demo/epayapi.php" target="_blank">
                <h4 class="form-header">
                <i class="fa icon-social-skype"></i>
                 测试支付
                </h4>

                <div class="form-group row">
                  <label for="input-14" class="col-sm-2 col-form-label">商户id：</label>
                  <div class="col-sm-4">
                    <input type="text" class="form-control" placeholder="输入您要进行测试的商户ID" name="id" value="<?php echo $usid?>">
                  </div>
                  <label for="input-15" class="col-sm-2 col-form-label">商户秘钥：</label>
                  <div class="col-sm-4">
                    <input type="text" class="form-control" name="key" placeholder="输入您要进行测试的商户密钥" value="<?php echo $userrow['key']?>">
                  </div>
                </div>

                <div class="form-group row">
                  <label for="input-16" class="col-sm-2 col-form-label">商户订单号：</label>
                  <div class="col-sm-10">
                    <input type="text" class="form-control" name="WIDout_trade_no" value="<?php echo date("YmdHis").mt_rand(100,999);?>" >
                  </div>
                </div>
                  <div class="form-group row">
                  <label for="input-14" class="col-sm-2 col-form-label">商品名称：</label>
                  <div class="col-sm-4">
                    <input type="text" class="form-control"  name="WIDsubject" value="一杯纯真牛奶～">
                  </div>
                  <label for="input-15" class="col-sm-2 col-form-label">付款金额[随机值]</label>
                  <div class="col-sm-4">
                    <input type="text" class="form-control" name="WIDtotal_fee" value="<?php echo mt_rand(1,10);?>" >
                  </div>
                </div>

               
                <div class="form-footer">
                    <button type="submit" class="btn btn-danger">确认支付</button>
                    
                </div>
              </form>
            </div>
          </div>
        </div>
      </div>
  <div class="row"><div class="col-lg-8"><p class="mb-0"><br/><br/></div>
                </div><hr>
        <div class="col-lg-12">
          <div class="card">
            <div class="card-header text-uppercase">关于在线测试的注意事项：</div>
             <div class="card-body">
                <ul class="list-group">
                    <li class="list-group-item list-group-item-primary">1.请不要恶意提交订单，投诉订单，否则后果自负.<br/>2.请确保您所提交的商户ID为您本人，测试支付成功后资金错乱概不负责.</li>
                    <li class="list-group-item list-group-item-secondary">3.商品订单号为唯一值，如中途放弃测试，请直接刷新页面获取最新的唯一订单号.<br/>4.付款金额为随机值<code>1-10</code>￥，请您不要恶意测试，否则后果自负.</p></li>
                  </ul>
             </div>
          </div>
        </div>
    </div>
    </div>
    <a href="javaScript:void();" class="back-to-top"><i class="fa fa-angle-double-up"></i> </a>
  </div>
	
<?php include 'foot.php';?>
